package milktea.service;

import milktea.dao.USERDao;
import milktea.entity.USER;

import java.util.ArrayList;

public class USERService {
    public static int insert(USER u) {
        return USERDao.insert(u);
    }

    public static int del(String id) {
        return USERDao.del(id);
    }

    public static int update(USER u) {
        return USERDao.update(u);
    }

    public static int[] totalpage(int count, String keyword) {
        return USERDao.totalpage(count, keyword);
    }

    public static ArrayList<USER> selectAll(int cpage, int count, String keyword) {
        return USERDao.selectAll(cpage, count, keyword);
    }

    public static USER selectByID(String id) {
        return USERDao.selectByID(id);
    }

    public static int selectByName(String id) {
        return USERDao.selectByName(id);
    }

    public static int selectByNM(String name, String pwd) {
        return USERDao.selectByNM(name, pwd);
    }

    public static USER selectAdmin(String name, String pwd) {
        return USERDao.selectAdmin(name, pwd);
    }
}
